package com.liziyi0914.morearmor;

import net.minecraft.server.network.ServerPlayerEntity;

import java.util.HashMap;
import java.util.UUID;

public class PlayerManager {

    private static final HashMap<UUID, ServerPlayerEntity> map = new HashMap<>();

    public static void register(ServerPlayerEntity entity) {
        if (map.containsKey(entity.getUuid())) {
            return;
        }
        map.put(entity.getUuid(), entity);
    }

    public static ServerPlayerEntity get(UUID uuid) {
        return map.get(uuid);
    }

}
